package com.lcg.word

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.ui.Modifier
import com.lcg.base.Core
import com.lcg.word.screen.NavGraphs
import com.lcg.word.ui.theme.WordTheme
import com.ramcosta.composedestinations.DestinationsNavHost

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        Core.activityCreateStart(this)
        super.onCreate(savedInstanceState)
        setContent {
            WordTheme {
                Surface(
                    modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background
                ) {
                    DestinationsNavHost(navGraph = NavGraphs.root)
                }
            }
        }
    }

    override fun onDestroy() {
        super.onDestroy()
        Core.activityDestroyed(this)
    }
}
